<!--这是物料渲染器-->
<template>
  <component :is="material"></component>
</template>

<script setup lang="ts">
import TextMaterial from "@/material/internal/TextMaterial.vue"
import ChartMaterial from "@/material/internal/ChartMaterial.vue"
import ImageMaterial from "@/material/internal/ImageMaterial.vue"

type MaterialType = 'text'|'image'|'chart';
const currentMaterialType: MaterialType = 'text';
let material:any;
switch (currentMaterialType) {
  case 'text':
    material = TextMaterial;
    break;
  case "chart":
    material = ChartMaterial;
    break;
  case "image":
    material = ImageMaterial;
    break;
  default:
    material = TextMaterial;
    break;
}
</script>

<style scoped>

</style>
